CONTENTS | INDEX | PREV | NEXT
exp
fexp
NAME
exp - return e to the power of the double quantity
fexp - return e to the power of the float quantity
SYNOPSIS
#include <math.h>
double a = exp(b);
double b;
float c = fexp(d);
float d;
FUNCTION
Returns e to the power of the floating point quantity
EXAMPLE
/*
* compile with the math library -lm
*/
#include <math.h>
#include <stdio.h>
main()
{
{
double a = exp(0.25);
printf("exp 0.25 = %lfn", a); /* 1.284 */
}
{ /* less accuracy */
float a = fexp(0.25);
printf("exp 0.25 = %lfn", (double)a);
}
return(0);
}
INPUTS
double b; double floating point value
float d; float floating point value
RESULTS
double a; result double floating point value
float c; result float floating point value